function filter(array, fn){
    let a = -1, maxArr = [];
    const len = array.length
    while (++a < len) {
        if (fn(array[a], a, array)) {
            maxArr.push(array[a])
        }
    }
    return maxArr
}

export default filter